package test;

import java.util.Scanner;
//字符串最后一个单词的长度
public class topic14 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            String s = sc.nextLine();
            String[] split = s.split(" ");
            System.out.println(split[split.length-1].length());
        }
    }
}
